package cn.jinjimi.app.entity;

import com.google.gson.annotations.SerializedName;

/**
 * Created by Roy
 * Date: 2017/3/21
 */

public class ZdbProductTimeLimit extends ZdbProduct {

    /* 剩余时间（秒）*/
    @SerializedName("remain_time")
    public int remainTime;

    public static class TimeLimit {
        public int day;
        public int hour;
        public int min;
        public int sec;

        public TimeLimit(int total) {
            day = total / (60 * 60 * 24);
            hour = (total % (60 * 60 * 24)) / (60 * 60);
            min = (total % (60 * 60 * 24) % (60 * 60)) / 60;
            sec = total - day * 60 * 60 * 24 - hour * 60 * 60 - min * 60;
        }
    }
}
